#ifndef QSVGHOST_H
#define QSVGHOST_H

#include <QObject>
#include "qframehost.h"
#include "property/qabstractproperty.h"
class QSvgHost : public QFrameHost
{
    Q_OBJECT
    Q_PROPERTY(QString svgcode READ getSvgCode WRITE setSvgCode)
public:
    Q_INVOKABLE QSvgHost(QAbstractHost *parent = 0);
    QString getShowName();
    QString getShowIcon();
    QString getShowGroup();
    QString getSvgGuid();
    QString getSvgCode();
    void setShowName(QString name);
    void setShowIcon(QString icon);
    void setShowGroup(QString group);
    void setSvgGuid(QString guid);
    void initWidgetObject() override;

public slots:
    void setSvgCode(QString svgCode);
    void setSvgFile(QString fileUrl);
    void onPropertyChanged(QVariant oldValue,QVariant newValue,QString properName);
protected:
    void initProperty() override;
protected:
    void createObject() override;


private:
    QString m_svgCode;
    QString m_svgFile;
    QString m_svgName;
    QString m_svgGuid;
    QString m_svgGroup;
    QString m_svgIcon;
    //QList<QAbstractProperty> m_svgProperties;
};

#endif // QSVGHOST_H
